package space

import (
	"fmt"
	"src/zeus/dbservice"
	"src/zeus/iserver"
	"src/zeus/linmath"
	"src/zeus/msgdef"
)

func (e *TinyEntity) GetDBID() uint64 {
	return 0
}

func (e *TinyEntity) GetSpaceID() uint64 {
	if e.space == nil {
		return 0
	}

	return e.space.GetID()
}

func (e *TinyEntity) GetSrvIDS() []*dbservice.EntitySrvInfo {
	return nil
}

func (e *TinyEntity) GetEntitySrvID(srvType uint8) (uint64, uint64, error) {
	return 0, 0, nil
}

// 是否存在与指定的服务器上
func (e *TinyEntity) IsExistSID(srvid uint64) bool {
	return false
}

func (e *TinyEntity) IsOwnerSpaceEntity() bool {
	return true
}

func (e *TinyEntity) IsSpaceEntity() bool {
	return true
}

func (e *TinyEntity) IsDestroyed() bool {
	return e.DestroyFlag
}
func (e *TinyEntity) SetOnDestroyCallback(f func()) {
	e.onDestroyFunc = f
}

func (e *TinyEntity) Post(srvType uint8, msg msgdef.IMsg) error {
	return nil
}

func (e *TinyEntity) DelayPost(srvType uint8, msg msgdef.IMsg) error {
	return nil
}

func (e *TinyEntity) RPC(srvType uint8, methodName string, args ...interface{}) error {
	return nil
}

/*func (e *TinyEntity) RPCOther(srvType uint8, srcEntityID uint64, methodName string, args ...interface{}) error {
	return nil
}*/

func (e *TinyEntity) EnterSpace(spaceID uint64) {

}

func (e *TinyEntity) LeaveSpace() {

}

func (e *TinyEntity) LeaveSpaceByID(spaceID uint64) {

}

func (e *TinyEntity) GetProxy() iserver.IEntityProxy {
	return nil
}

func (e *TinyEntity) LinkToTarget(t iserver.ICoordEntity) {}

func (e *TinyEntity) Unlink() {}

func (e *TinyEntity) LinkedBy(o iserver.ICoordEntity) {}

func (e *TinyEntity) UnlinkedBy(o iserver.ICoordEntity) {}

func (e *TinyEntity) GetLinkedEntity() map[uint64]iserver.ICoordEntity {
	return nil
}

func (e *TinyEntity) IsLinked() bool {
	return false
}

func (e *TinyEntity) IsBeLinked() bool {
	return false
}

func (e *TinyEntity) SetCoordPos(pos linmath.Vector3) {}

func (e *TinyEntity) GetBaseProps() []byte {
	return nil
}

func (e *TinyEntity) SetClient(s iserver.ISess) {
}

func (e *TinyEntity) OnPanic(err error) {}

// 实体字符串化
func (e *TinyEntity) String() string {
	r := e.realPtr
	return fmt.Sprintf("[Type:%s EntityID:%d DBID:%d SpaceID:%d]",
		r.GetType(), r.GetID(), r.GetDBID(), r.GetSpaceID())
}

// SetDelay 设置延迟的值
func (e *TinyEntity) SetDelay(d uint8) {
}

// GetDelay 获取延迟的值
func (e *TinyEntity) GetDelay() uint8 {
	return 0
}
